import com.zj.bean.*;
import java.util.*;
import org.rythmengine.template.TemplateBase;
import java.io.*;

public class act_custom_html__R_T_C__ extends zj_zj_work_projects_all_mine_summerboot_html__main_template_html__R_T_C__ {//<extended_resource_key>C:/zj/zj_work_projects_all/mine/summerboot/html//main_template.html</extended_resource_key>

	public java.lang.String __getName() {
		return "act.custom.html";
	}

	protected void __setup() {
		if (__isDefVal(rtInfo)) {rtInfo = __get("rtInfo",RtInfo.class) ;}
	}

	protected void __loadExtendingArgs() {
		__parent.__setRenderArg("menu", "opencard"); //line: 1
	}

	protected RtInfo rtInfo=null; //line: 3

	protected java.lang.String __renderArgName(int __pos) {
		int __p = 0;
		if (__p++ == __pos) return "rtInfo";
		throw new ArrayIndexOutOfBoundsException();
	}

	protected java.util.Map<java.lang.String, java.lang.Class> __renderArgTypeMap() {
		java.util.Map<java.lang.String, java.lang.Class> __m = new java.util.HashMap<String, Class>();
		__m.put("rtInfo", RtInfo.class);
		return __m;
	}

	@SuppressWarnings("unchecked")
	public TemplateBase __setRenderArgs(java.util.Map<java.lang.String, java.lang.Object> __args) {
		if (null == __args) throw new NullPointerException();
		if (__args.isEmpty()) return this;
		super.__setRenderArgs(__args);
		if (__args.containsKey("rtInfo")) this.rtInfo = __get(__args,"rtInfo",RtInfo.class);
		return this;
	}

	@SuppressWarnings("unchecked") public TemplateBase __setRenderArgs(java.lang.Object... __args) {
		int __p = 0, __l = __args.length;
		if (__p < __l) { 
			Object v = __args[__p++]; 
			rtInfo = __safeCast(v, RtInfo.class); 
			__renderArgs.put("rtInfo",rtInfo);
		}
		return this;
	}

	protected java.lang.Class[] __renderArgTypeArray() {
		return new java.lang.Class[]{RtInfo.class, };
	}

	@SuppressWarnings("unchecked") @Override public TemplateBase __setRenderArg(java.lang.String __name, java.lang.Object __arg) {
		if ("rtInfo".equals(__name)) this.rtInfo = __safeCast(__arg, RtInfo.class);
		super.__setRenderArg(__name, __arg);
		return this;
	}

	@SuppressWarnings("unchecked") public TemplateBase __setRenderArg(int __pos, java.lang.Object __arg) {
		int __p = 0;
				if (__p++ == __pos) { 
			Object v = __arg; 
			rtInfo = __safeCast(v, RtInfo.class); 
			__renderArgs.put("rtInfo", rtInfo);
		}
		if(0 == __pos) __setRenderArg("arg", __arg);
		return this;
	}





	public org.rythmengine.utils.TextBuilder build(){
		buffer().ensureCapacity(5233);
p("<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<title>活动助手</title>\n<link rel=\"stylesheet\" href=\""); //line: 9
{ //line: 9
	org.rythmengine.template.ITag.__ParameterList _pl = null;  //line: 9
	_pl = new org.rythmengine.template.ITag.__ParameterList(); //line: 9
	_pl.add("","/static/css/bootstrap.min.css"); //line: 9
		__invokeTag(9, "res", _pl, false); //line: 9
} //line: 9
p("\">\n<link rel=\"stylesheet\" href=\""); //line: 10
{ //line: 10
	org.rythmengine.template.ITag.__ParameterList _pl = null;  //line: 10
	_pl = new org.rythmengine.template.ITag.__ParameterList(); //line: 10
	_pl.add("","/static/css/main.css"); //line: 10
		__invokeTag(10, "res", _pl, false); //line: 10
} //line: 10
p("\">\n</head>\n<body class=\"manage\">\n<div class=\"panel panel-primary\">\n<div class=\"panel-heading\">\n<i class=\"glyphicon glyphicon-bookmark pull-left\"></i>\n<h3 class=\"panel-title\">客户表管理</h3>\n</div>\n<div class=\"panel-body row table_content\">\n<form action=\"?\" class=\"form-inline row\" method=\"get\">\n<div class=\"form-group col-xs-4\" style=\"text-align: center;\">\n<label for=\"txtCardId\" class=\"control-label\">客户</label>\n<input name=\"cusName\" value=\""); //line: 22
{ //line: 22
	org.rythmengine.template.ITag.__ParameterList _pl = null;  //line: 22
		__invokeTag(22, "val", _pl, false); //line: 22
} //line: 22
p("\" type=\"text\" class=\"form-control\" id=\"txtCardId\" placeholder=\"客户\"/>\n<button type=\"submit\" class=\"btn btn-success\">查询</button>\n<input type=\"button\" id=\"addCus\" class=\"btn btn-success\" value=\"新增\"/>\n</div>\n</form>\n<div style=\"padding: 50px 10px;width: 92%;margin: 0px auto;\">\n<table id=\"table_data\" class=\"table table-hover\">\n<thead>\n<tr>\n<th>序号</th>\n<th>客户名称</th>\n<th>关联口令库Id</th>\n<th>关联口令库名称</th>\n<th>短链接生成地址</th>\n<th>操作</th>\n</tr>\n</thead>\n<tbody>\n"); //line: 41

if (org.rythmengine.utils.Eval.eval(rtInfo != null && rtInfo.getCustomList() !=null)) { //line: 40
p(" "); //line: 42
{
__Itr<Custom> __v0 = __Itr.valueOf(rtInfo.getCustomList()); //line: 41
int cs_size = __v0.size(); //line: 41
if (cs_size > 0) { //line: 41
int cs_index = 0; //line: 41
for(Custom cs : __v0) { //line: 41
cs_index++; //line: 41
boolean cs_isOdd = cs_index % 2 == 1; //line: 41
java.lang.String cs_parity = cs_isOdd ? "odd" : "even"; //line: 41
boolean cs_isFirst = cs_index == 1; //line: 41
boolean cs_isLast = cs_index >= cs_size; //line: 41
org.rythmengine.utils.RawData cs_sep = new org.rythmengine.utils.RawData(cs_isLast ? "" : ","); //line: 41
org.rythmengine.utils.RawData cs__sep = new org.rythmengine.utils.RawData(org.rythmengine.utils.S.escape(cs)+(cs_isLast ? "" : ",")); //line: 41
org.rythmengine.internal.LoopUtil cs_utils = new org.rythmengine.internal.LoopUtil(cs_isFirst, cs_isLast); //line: 41
org.rythmengine.internal.LoopUtil cs__utils = new org.rythmengine.internal.LoopUtil(cs_isFirst, cs_isLast, cs); //line: 41
__pushItrVar("cs", cs); //line: 41
p(" <tr>\n<td>"); //line: 43

try{pe(cs.getId());} catch (RuntimeException e) {__handleTemplateExecutionException(e);}  //line: 43
p("</td>\n<td>"); //line: 44

try{pe(cs.getCusName());} catch (RuntimeException e) {__handleTemplateExecutionException(e);}  //line: 44
p("</td>\n<td>"); //line: 45

try{pe(cs.getCmdId());} catch (RuntimeException e) {__handleTemplateExecutionException(e);}  //line: 45
p("</td>\n<td>"); //line: 46

try{pe(cs.getCmdName());} catch (RuntimeException e) {__handleTemplateExecutionException(e);}  //line: 46
p("</td>\n<td>"); //line: 47

try{pe(cs.getShortUrl());} catch (RuntimeException e) {__handleTemplateExecutionException(e);}  //line: 47
p("</td>\n<td><a href=\""); //line: 48
{ //line: 48
	org.rythmengine.template.ITag.__ParameterList _pl = null;  //line: 48
	_pl = new org.rythmengine.template.ITag.__ParameterList(); //line: 48
	_pl.add("","/act/delCustom.html?id="); //line: 48
		__invokeTag(48, "url", _pl, false); //line: 48
} //line: 48

try{pe(cs.getId());} catch (RuntimeException e) {__handleTemplateExecutionException(e);}  //line: 48
p("\">删除</a>|<a href=\"#\" onclick=\"copy('"); //line: 48

try{pe(cs.getShortUrl());} catch (RuntimeException e) {__handleTemplateExecutionException(e);}  //line: 48
p("')\">复制链接</a></td>\n</tr>\n"); //line: 49

	__popItrVar();
	}
}
}
 //line: 50
} //line: 51
p(" </tbody>\n</table>\n</div>\n</div>\n</div>\n<div id=\"jsAuthor\" class=\"hidden\">\n<div class=\"row\">\n<h2 class=\"col-xs-12 text-danger text-center\"><span id=\"edit\"></span>客户数据</h2>\n<form class=\"form-horizontal col-xs-9\" id=\"powerCard\">\n<input type=\"hidden\" id=\"id\" name=\"id\" value=\"-1\"/>\n<div class=\"form-group\">\n<label for=\"pwdAuthor\" class=\"col-xs-4 control-label\">客户名称</label>\n<div class=\"col-xs-8\">\n<input type=\"text\" name=\"cusName\" class=\"form-control\" id=\"cusName\" placeholder=\"请输入客户名称\">\n</div>\n</div>\n<div class=\"form-group\">\n<label for=\"pwdAuthor\" class=\"col-xs-4 control-label\">关联口令库</label>\n<div class=\"col-xs-8\">\n<select name=\"cmdId\" id=\"cmdId\" class=\"form-control\">\n"); //line: 73

if (org.rythmengine.utils.Eval.eval(rtInfo != null && rtInfo.getCommandList() !=null)) { //line: 72
p(" "); //line: 74
{
__Itr<Command> __v11188 = __Itr.valueOf(rtInfo.getCommandList()); //line: 73
int cm_size = __v11188.size(); //line: 73
if (cm_size > 0) { //line: 73
int cm_index = 0; //line: 73
for(Command cm : __v11188) { //line: 73
cm_index++; //line: 73
boolean cm_isOdd = cm_index % 2 == 1; //line: 73
java.lang.String cm_parity = cm_isOdd ? "odd" : "even"; //line: 73
boolean cm_isFirst = cm_index == 1; //line: 73
boolean cm_isLast = cm_index >= cm_size; //line: 73
org.rythmengine.utils.RawData cm_sep = new org.rythmengine.utils.RawData(cm_isLast ? "" : ","); //line: 73
org.rythmengine.utils.RawData cm__sep = new org.rythmengine.utils.RawData(org.rythmengine.utils.S.escape(cm)+(cm_isLast ? "" : ",")); //line: 73
org.rythmengine.internal.LoopUtil cm_utils = new org.rythmengine.internal.LoopUtil(cm_isFirst, cm_isLast); //line: 73
org.rythmengine.internal.LoopUtil cm__utils = new org.rythmengine.internal.LoopUtil(cm_isFirst, cm_isLast, cm); //line: 73
__pushItrVar("cm", cm); //line: 73
p(" <option value=\""); //line: 74

try{pe(cm.getId());} catch (RuntimeException e) {__handleTemplateExecutionException(e);}  //line: 74
p("\">"); //line: 74

try{pe(cm.getCmdName());} catch (RuntimeException e) {__handleTemplateExecutionException(e);}  //line: 74
p("</option>\n"); //line: 74

	__popItrVar();
	}
}
}
 //line: 75
} //line: 76
p(" </select>\n</div>\n</div>\n</form>\n</div>\n</div>\n"); //line: 83
p('<');p("script type=\"text/javascript\" src=\""); //line: 1
{ //line: 1
	org.rythmengine.template.ITag.__ParameterList _pl = null;  //line: 1
	_pl = new org.rythmengine.template.ITag.__ParameterList(); //line: 1
	_pl.add("","/static/js/jquery-1.10.2.min.js"); //line: 1
		__invokeTag(1, "res", _pl, false); //line: 1
} //line: 1
p("\">"); //line: 1
;__ctx.pushCodeType((org.rythmengine.extension.ICodeType)org.rythmengine.extension.ICodeType.DefImpl.JS.clone()); //line: 83
p("</script>");__ctx.popCodeType(); //line: 83
p("\n"); //line: 84
p('<');p("script type=\"text/javascript\" src=\""); //line: 1
{ //line: 1
	org.rythmengine.template.ITag.__ParameterList _pl = null;  //line: 1
	_pl = new org.rythmengine.template.ITag.__ParameterList(); //line: 1
	_pl.add("","/static/js/bootstrap.min.js"); //line: 1
		__invokeTag(1, "res", _pl, false); //line: 1
} //line: 1
p("\">"); //line: 1
;__ctx.pushCodeType((org.rythmengine.extension.ICodeType)org.rythmengine.extension.ICodeType.DefImpl.JS.clone()); //line: 84
p("</script>");__ctx.popCodeType(); //line: 84
p("\n"); //line: 85
p('<');p("script type=\"text/javascript\" src=\""); //line: 1
{ //line: 1
	org.rythmengine.template.ITag.__ParameterList _pl = null;  //line: 1
	_pl = new org.rythmengine.template.ITag.__ParameterList(); //line: 1
	_pl.add("","/static/js/main.js"); //line: 1
		__invokeTag(1, "res", _pl, false); //line: 1
} //line: 1
p("\">"); //line: 1
;__ctx.pushCodeType((org.rythmengine.extension.ICodeType)org.rythmengine.extension.ICodeType.DefImpl.JS.clone()); //line: 85
p("</script>");__ctx.popCodeType(); //line: 85
p("\n"); //line: 86
p("<script>");__ctx.pushCodeType((org.rythmengine.extension.ICodeType)org.rythmengine.extension.ICodeType.DefImpl.JS.clone()); //line: 86
p("\nvar appRoot=\""); //line: 87
{ //line: 87
	org.rythmengine.template.ITag.__ParameterList _pl = null;  //line: 87
	_pl = new org.rythmengine.template.ITag.__ParameterList(); //line: 87
	_pl.add("","/"); //line: 87
		__invokeTag(87, "url", _pl, false); //line: 87
} //line: 87
p("\";\n$(\"#table_data tr\").dblclick(function(){\nvar csId = $(this).children('td').eq(0).text();\nvar csName = $(this).children('td').eq(1).text();\nvar cmdId = $(this).children('td').eq(2).text();\n$(\"#id\").val(csId);\n$(\"#cusName\").val(csName);\n$(\"#cmdId\").val(cmdId);\n$(\"#edit\").text(\"修改\");\nutil.el.confirm(\"#jsAuthor\",function () {\nutil.request.post(\"/act/custom.json\",{id:csId,cmdId:$(\"#cmdId\").val(),cusName:$(\"#cusName\").val()},function(data){\n$(\"#jsBtnDrawMoney\").removeAttr(\"disabled\");\nutil.el.alert(\"修改成功!\");\nwindow.location.reload();\n});\n});\n});\n$(\"#addCus\").click(function () {\n$(\"#edit\").text(\"新增\");\nutil.el.confirm(\"#jsAuthor\",function () {\nutil.request.post(\"/act/custom.json\",{id:-1,cmdId:$(\"#cmdId\").val(),cusName:$(\"#cusName\").val()},function(data){\n$(\"#jsBtnDrawMoney\").removeAttr(\"disabled\");\nutil.el.alert(\"添加成功!\");\nwindow.location.reload();\n});\n});\n});\nfunction copy(url){\nvar oInput = document.createElement('input');\noInput.value = url;\ndocument.body.appendChild(oInput);\noInput.select(); // 选择对象\ndocument.execCommand(\"Copy\"); // 执行浏览器复制命令\noInput.className = 'oInput';\noInput.style.display='none';\nalert('复制成功');\n}\n"); //line: 125
p("</script>");__ctx.popCodeType(); //line: 125
p("\n</body>\n</html>"); //line: 127

		return this;
	}

}
